package 蓝桥._2024.劲舞团;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        // h h 1709446139591
        Scanner sc = new Scanner(new File("D:\\编程练习\\力扣刷题\\leetcode\\src\\蓝桥\\_2024\\劲舞团\\log.txt"));
        int max = 0;
        int now = 0;
        long last = 0;
        while (sc.hasNext()) {
            String a = sc.next();
            String b = sc.next();
            long c = sc.nextLong();
            if(a.equals(b)){
                // 正确
                if(c - last <= 1000){
                    // 时间差小于1000， 连击
                    now++;
                    last = c;
                }else {
                    // 时间差大于1000， 重新计数
                    max = Math.max(max, now);
                    now = 1;
                    last = c;
                }
            }else{
                // 不正确
                max = Math.max(max, now);
                now = 0;
            }
        }
        System.out.println(max);


    }
}
